home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / trinitybbs20.lha / OLP / last10callers < prev    next >
Text File  |  1995-09-26  |  2KB  |  81 lines

  1. /*
  2.              Last Caller v1.4a
  3.  
  4.             (Save and Read!)
  5.  
  6.             written by
  7.  
  8.                 Chris Parker
  9.  
  10.             (c) copyright 1990  Chris Parker
  11.             All Rights Reserved
  12.  
  13.  
  14.     Lord Berek                Chris Parker
  15.     Orange County Programmers BBS        19221 Biddle Drive
  16.     (714)854-0613                Irvine, CA  92715
  17.  
  18.  
  19.     (indents are TABS not spaces [take less space])
  20. */
  21. options results
  22. CallUser = "olp:CallUsers"
  23.                     /*****************************/
  24. LastCallers=10                /* Number of callers to list */
  25.                     /*****************************/
  26. Bypass=0                /* 1 = allow high users to   */
  27.                     /* bypass being in the log   */
  28.                     /*****************************/
  29. do i=1 to LastCallers;Line.i="";end
  30. GETUSER 1;UserName=result
  31. GETUSER 4;UserCity=result
  32. GETUSER 15;UserAcc=result
  33. GETUSER 17;UserSMa=result
  34. GETUSER 40;UserID=result
  35. GETUSER 12;UserDate=result
  36. GETUSER 23;UserPort=result
  37. GETUSER 24;UserBaud=result
  38. UserBaud=UserBaud*10
  39. if ~exists(CallUser) then do
  40.     call open OldUserData,CallUser,'W'
  41.     call close OldUserData
  42. end
  43. call open OldUserData,CallUser,'R'
  44. i=1
  45. do until eof(OldUserData)
  46.     line.i=readln(OldUserData)
  47.     if line.i~="" then do;i=i+1;HighLine=i;end
  48. end
  49. call close OldUserData
  50. if Bypass=1 then do
  51.     if (UserAcc=23)|(UserSma=1)|(UserID=1) then do
  52.         Sendstring "c7Do you wish to enter yourself into log of last callers (y/N)?"
  53.         getchar
  54.         if result ~= "Y" then do;Transmit " c3Non2";call VIEW;end
  55.         Transmit " c1Yes"
  56.     end
  57. end
  58. sendstring "c5Logging your callc1..."
  59. if userid=1 then call VIEW
  60. call open NewUserData,CallUser,'W'
  61. call writeln NewUserData,UserName" : "UserCity" : "UserDate" : "UserBaud" : "UserPort""
  62. do i=1 to (LastCallers-1);if line.i~="" then call writeln(NewUserData,line.i);end
  63. call close NewUserData
  64.  
  65. VIEW:
  66. Transmit "h9h4h7c5Last c1"||LastCallers||"c5 Callers To The System"
  67. Transmit " "
  68. Transmit " c7Caller's Handle       City,  State          Logon Date, Time       Baud "
  69. Transmit "c2--------------------  --------------------  ----------------------  ---- "
  70. if exists(CallUser) then do
  71.     call open OldUserData,CallUser,'R'
  72.     do until eof(OldUserData)
  73.         line=readln(OldUserData)
  74.         if line="" then iterate
  75.         parse var line name ' : ' city ' : ' date ' : ' baud  ' : ' prt
  76.         Transmit "c6"left(name,22)"c7"left(city,22)"c3"left(date,24)"c4"left(baud,6)"c6"left(prt,1)""
  77.     end
  78.     call close OldUserData
  79. end
  80. exit
  81.